package inet.app.tuvi.util;
//package inet.app.util;
//
//import inet.app.vod.temp.Item_RadioDetail;
//
//import java.io.File;
//import java.io.FilenameFilter;
//import java.util.ArrayList;
//
//public class SongsManager {
//	// SDCard Path
//	final String MEDIA_PATH = new String("/sdcard/");
//	private ArrayList<Item_RadioDetail> songsList = new ArrayList<Item_RadioDetail>();
//	
//	// Constructor
//	public SongsManager(){
//		
//	}
//	
//	/**
//	 * Function to read all mp3 files from sdcard
//	 * and store the details in ArrayList
//	 */
//	public ArrayList<Item_RadioDetail> getPlayList(){
//		File home = new File(MEDIA_PATH);
//
//		if (home.listFiles(new FileExtensionFilter()).length > 0) {
//			for (File file : home.listFiles(new FileExtensionFilter())) {
//				Item_RadioDetail song = new Item_RadioDetail("", 
//						file.getName().substring(0, (file.getName().length() - 4)), 
//							file.getPath(), "", "sdfsfsdfsdfd");
//				
//				// Adding each song to SongList
//				songsList.add(song);
//				if(songsList.size()>5) break;
//			}
//		}
//		// return songs list array
//		return songsList;
//	}
//	
//	/**
//	 * Class to filter files which are having .mp3 extension
//	 */
//	class FileExtensionFilter implements FilenameFilter {
//		public boolean accept(File dir, String name) {
//			return (name.endsWith(".mp3") || name.endsWith(".MP3"));
//		}
//	}
//}
